package com.example.service.commentImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.domain.comment;
import com.example.mapper.comment.commentQuery;
import com.example.service.comment.commentService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Service
public class commentServiceImpl extends ServiceImpl<commentQuery, comment> implements commentService {
    @Resource
    private commentQuery commentQuery;


    @Override
    public boolean insert(comment comment) {
        return commentQuery.insert(comment)>0;
    }

    @Override
    public boolean update(int articlesid,String openid) {
        return commentQuery.genxin(articlesid,openid);
    }

    @Override
    public List<comment> select1(int id) {
        return commentQuery.select11(id);
    }

    @Override
    public List<comment> selectall(int a, int b,String name) {
        return commentQuery.selectall(a,b,name);
    }

    @Override
    public int num() {
        return commentQuery.num();
    }
}
